import { useEffect } from 'react';
import A from '../A/index';
import B from '../B/index';
import usePriceStore from '../../store/price';
function HelloWorld(props) {

    useEffect(() => {
        usePriceStore.subscribe((state) => state.price, (price, prevPrice) => {
            console.log('price change ===>', price, prevPrice);
        })
        // return () => {
        //     usePriceStore.unsubscribe()
        // }, {
        //     fireImmediately: true,
        //     equalityFn: (a, b) => a === b,
        // }
    }, []);

    return (
        <div>
            {/* <A />
            <hr />
            <B /> */}
        </div>
    );
}



export default HelloWorld;